package com.ulic.customerManApplication.usermodule.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ulic.customerManApplication.usermodule.bo.Role;
import com.ulic.customerManApplication.usermodule.dao.RoleDao;
import com.ulic.customerManApplication.usermodule.service.RoleService;

@Component("userRoleService")
public class RoleServiceImpl implements RoleService {

	private RoleDao roleDao;
	
	 @Resource
	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}

	@Override
	public Role getRole(int oid) throws Exception {
		return roleDao.getRole(oid);
	}

	@Override
	public List<Role> getRole() throws Exception {
		return roleDao.getRole();
	}

	@Override
	public void setUserRole(String userid, int objectid) throws Exception {
		roleDao.setUserRole(userid, objectid);
	}

	@Override
	public int[] getUserRole(String userid) throws Exception {
		return roleDao.getUserRole(userid);
	}

}
